{% extends "base.html" %}
{% block content %}
<h1>Raw HTML</h1>
<p>Simply want to generate some HTML? Use make_response=False or pass
a None request</p>
<div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">obviews.views</span> <span class="kn">import</span> <span class="n">View</span><span class="p">,</span> <span class="n">FormView</span>

<span class="c"># You don&#39;t even have a Request object to start with ?</span>
<span class="k">class</span> <span class="nc">RawHTMLView</span><span class="p">(</span><span class="n">View</span><span class="p">):</span>
    <span class="n">template_name</span> <span class="o">=</span> <span class="s">&quot;raw.html&quot;</span>

<span class="k">def</span> <span class="nf">print_html</span><span class="p">():</span>
    <span class="n">view</span> <span class="o">=</span> <span class="n">RawHTMLView</span><span class="p">()</span>
    <span class="k">print</span> <span class="n">view</span><span class="p">(</span><span class="bp">None</span><span class="p">)</span>    <span class="c"># make_response=False not necessary when request is None</span>

<span class="n">urlpatterns</span> <span class="o">=</span> <span class="n">patterns</span><span class="p">(</span><span class="s">&#39;&#39;</span><span class="p">,</span>
    <span class="p">(</span><span class="s">&#39;^about/raw/$&#39;</span><span class="p">,</span> <span class="n">RawHTMLView</span><span class="p">()),</span>
<span class="p">)</span>

</pre></div>
<p>
  Now that we have been around all options one by one,
  <strong>follows</strong> a quick sum-up of <a
  href="/all/first/second/">all options available in views</a>...
</p>
{% endblock %}
